{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Numpy和原生Python用于数组计算的性能对比\n",
    "\n",
    "需求：\n",
    "* 实现两个数组的加法\n",
    "* 数组A是1~N数字的平方\n",
    "* 数组B是1~N数字的立方\n",
    "\n",
    "对比使用Numpy和原生Python的性能对比"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 引入Numpy的包"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'1.17.1'"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.__version__"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 使用Python原生语法实现对比"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "def python_sum(n):\n",
    "    \"\"\" Python实现数组的加法\n",
    "    @param n：数组的长度\n",
    "    \"\"\"\n",
    "    a = [i**2 for i in range(n)]\n",
    "    b = [i**3 for i in range(n)]\n",
    "    c = []\n",
    "    for i in range(n):\n",
    "        c.append(a[i] + b[i])\n",
    "    return c"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[0, 2, 12, 36, 80, 150, 252, 392, 576, 810]"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 测试一下\n",
    "python_sum(10)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 使用Numpy实现"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "def numpy_sum(n):\n",
    "    \"\"\" numpy实现数组的加法\n",
    "    @param n：数组的长度\n",
    "    \"\"\"\n",
    "    a = np.arange(n) ** 2\n",
    "    b = np.arange(n) ** 3\n",
    "    return a+b"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([  0,   2,  12,  36,  80, 150, 252, 392, 576, 810], dtype=int32)"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 测试一下\n",
    "numpy_sum(10)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 性能对比：执行1000次"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "682 µs ± 3.98 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)\n"
     ]
    }
   ],
   "source": [
    "%timeit python_sum(1000)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "6.75 µs ± 36.4 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)\n"
     ]
    }
   ],
   "source": [
    "%timeit numpy_sum(1000)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 性能对比：执行10W次"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "73.5 ms ± 250 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)\n"
     ]
    }
   ],
   "source": [
    "%timeit python_sum(10 * 10000)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "313 µs ± 1.2 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)\n"
     ]
    }
   ],
   "source": [
    "%timeit numpy_sum(10 * 10000)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 性能对比：执行1000W次"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "8.05 s ± 29.4 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)\n"
     ]
    }
   ],
   "source": [
    "%timeit python_sum(1000 * 10000)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "90.5 ms ± 2.21 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)\n"
     ]
    }
   ],
   "source": [
    "%timeit numpy_sum(1000 * 10000)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 绘制性能对比图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "pytimes = [682, 73.5*1000, 8.05*1000*1000]\n",
    "nptimes = [6.75, 313, 90.5*1000]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [],
   "source": [
    "df = pd.DataFrame({\n",
    "    \"pytimes\":pytimes,\n",
    "    \"nptimes\":nptimes,\n",
    "})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x1d883776708>"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZAAAAD1CAYAAAB+8aORAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW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Pv2nbllVdy3HHHMWXKlBI9q29f+H2Zdca38e5dklZERH2pbb5Suo864YQTOOigg/je977X1VMxMyvJAdLFhgwZUvLoY8WKFV0wGzOz8u3XX6ZoZmb5HCBmZpbFAWJmZlkcIGZmlsUB0s0sXbp0l2/gvfXWW5k7d24XzsjM9le+C6vYdYft5f29sXf3RyFADj744J3PAbn88sv3+hhmZuXwEUgXW7NmDcOGDeMLX/gCI0aMoKGhga1btzJu3DiuuuoqTjrpJEaOHMnjjz/OmjVruPXWW5k+fTp1dXU89NBDXHfdddx0000AjBs3jquvvppTTjmFYcOGsXz5cs455xxqa2v5xje+sXPMO+64gzFjxlBXV8dll13G9u3b2b59O5dccgkjR45k1KhRTJ8+vat+JWbWTfgIZB+wevVq5s2bx49//GMuuOAC7r33XgD+8pe/8Oijj/Lggw/y+c9/nmeeeYbLL7+cgw8+mK9+9asALFmyZJd99e7dmwcffJCbb76ZiRMnsmLFCo444giOOeYYrr76atavX8/dd9/NI488Qq9evfjiF7/InXfeyYgRI3jllVd2fiZl8+bN1f0lmFm34wDZBwwdOpS6ujqg8An09q9ev+iiiwA45ZRTePPNN8v6R/2ss84CCl/hPmLECAYOHAjAhz/8YdauXcvDDz/MihUrGD16NABbt27lyCOP5Mwzz+TFF1/kS1/6EmecccbOr4I3M9sdB8g+oPhr2Hv06MHWrVuB0l/zXu6+ir/OvX1927ZtRASNjY185zvfeVffJ598kkWLFjFz5kzmz5/P7Nmzs34eM9s/+BrIPuzuu+8G4OGHH+awww7jsMMO45BDDnlPj5sdP34899xzD+vXrwdg48aNvPTSS7z++uvs2LGDc889l+uvv54nnnhir/wMZvb+5SOQfVi/fv046aSTePPNN3ceDZx55pmcd955LFiwYOdjaisxfPhwbrjhBhoaGtixYwe9evVi5syZ9O3bl8mTJ7Njxw6AkkcoZmbF/HXu++jXk48bN46bbrqJ+vqS36LcJfbl35dZO3+d+961p69z9yksMzPL0mmASPpnSSuLXm9KukrSEZIWS1qd3vul9pI0Q1KLpKckHV+0r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ywOEDMzy+IAMTOzLN02QCRNkPS8pBZJ07p6PmZm+5tOH2m7L5LUA5gJ/DvQCiyXtDAinuvamZnZfue6w6o83hvVHW8PumWAAGOAloh4EUDSXcBEwAFie8WQafdVbaw1N55RtbHM9qbuGiCDgLVF663AiR0bSWoCmtLqnyU9X4W5dZUPAq939SSscvqu/+y6M1X7795/qmpDJf+0uw3dNUBK/QbjXYWIWcCsf/x0up6k5oio7+p5WOX8Z9e97c9/ft31InorMLhovQZY10VzMTPbL3XXAFkO1EoaKqk3cCGwsIvnZGa2X+mWp7AiYpukK4FFQA9gdkQ828XT6mr7xam69yn/2XVv++2fnyLedenAzMysU931FJaZmXUxB4iZmWVxgJiZWZZueRHdQNLHKHz6fhCFz8CsAxZGxKounZjZ+1z6uzcIeCwi/lxUnxARv+q6mVWfj0C6IUnXAHdR+EDl4xRuaxYwz18s2b1JmtzVc7Ddk/QfwALgS8AzkiYWbf5218yq6/gurG5I0h+BERHxTod6b+DZiKjtmpnZeyXp5Yj4UFfPw0qT9DTwLxHxZ0lDgHuA2yPiZkm/j4jjunSCVeZTWN3TDuBo4KUO9YFpm+3DJD21u03AUdWci1WsR/tpq4hYI2kccI+kf6L0Vyy9rzlAuqergCWSVvP3L5X8EPAR4Moum5WV6yjgNGBTh7qAR6s/HavAf0uqi4iVAOlI5NPAbGBU106t+hwg3VBE/ErSRyl8rf0gCv/wtALLI2J7l07OyvEL4OD2f4SKSVpa/elYBSYB24oLEbENmCTp/3TNlLqOr4GYmVkW34VlZmZZHCBmZpbFAWJmZlkcIGZmlsUBYmZmWf4/IhJeXRjaeqUAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "df.plot.bar()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
